Conventionally, many software applications (or simply referred to as applications) generate graphical user interface (GUI) for various purposes, such as, to present information, to interact with users, etc. The use of GUI is particularly important for web applications. As such, to properly validate applications, the GUI of the applications has to be tested in addition to running other tests, like functional tests. Conventionally, manual visual testing is performed to ensure the GUI under test looks correct. For example, a software developer can eye-ball a screenshot of a GUI to see if the layout of the GUI and the content presented in the GUI are rendered as intended. However, such visual testing is repetitious and so error-prone. Moreover, the test result can be inconsistent if the eye-balling is performed by different people.
Currently, there are tools developed for visual testing, such as PerceptualDiff. In general, PerceptualDiff detects difference between two images, and it is focused on field of view, Gamma and luminance changes in the images. However, such existing visual testing tools are not well suited for visual testing of screenshots. One reason is that screenshots usually do not change field of view. Another reason is that screenshots typically do not change in Gamma and luminance when acquired on the same machine with the same display configuration. Therefore, such existing visual testing tools cannot effectively and accurately visually test applications.